<script>
    import {TabbarItem} from 'vant';
    import {route} from "vant/lib/utils/router";

    export default {
        name: TabbarItem.name,

        extends: TabbarItem,

        methods: {
            onClick (event) {
                this.parent.triggerChange(this.name || this.index, () => route(this.$router, this));

                this.$emit('click', event);
            },
        }
    }
</script>